﻿Imports Microsoft.DirectX
Public Class LandschaftstexturKAPUTTESCHWEISSNAHT
    Inherits ObjektLandschaftsTextur
    Dim Msh As Objekt3D


    Public Sub New()
        ID = "KAPUTTESCHWEISSNAHT"
        Landschaftsname = "Ebene"
        Deckung = 1
        Tarnung = False
        KP = -1
        TexturenLaden(New String() {"KaputtePipeLine+N+S", "KaputtePipeLine+O+W"})
        Normal = -1
        Ausrichtungslandschaften = New String() {"PIPELINE", "PLINE", "PIPE", "PIPESTATION", "FABRIK"}
        If DataSettings.draw3D Then
            Ini3D()
        End If
    End Sub

    Public Overrides Function DrawSpecialStyle(ByVal BildID As Integer, ByVal Fog As Nebelarten, ByVal Alpha As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal TerrainUntergrundID As Integer, ByVal TerrainUntergrundBildID As Integer, ByVal TerrainUntergrundID2 As Integer, ByVal TerrainUntergrundBildID2 As Integer, Optional ByVal FixedLocation As Boolean = False, Optional ByVal Top As Boolean = False) As Boolean
        Return DrawTerrainUndUntergrund(Alpha, Fog, BildID, X, Y, 0, 0, TerrainUntergrundID, TerrainUntergrundBildID, TerrainUntergrundID2, TerrainUntergrundBildID2, FixedLocation, Top)
    End Function

    Public Overrides Function GetTerrainUntergrund() As String()
        Return New String() {"EBENE", "SCHNEE", "WUESTE"}
    End Function

    Public Overrides Sub Malen3D(ByVal p_MatCube As Microsoft.DirectX.Matrix, ByVal Landschaft As ObjektLandschaft)
        'Ganz normal eine Ebene als Untergrund malen.
        Malen3D(p_MatCube, "EBENE", Landschaft)
        'und dann eben noch ein paar Ueberreste von der Schweissnaht malen.
        Dim Rot As Single = 0
        Dim Ausr As String = AusrichtungVereinfachen(getAusrichtung(Landschaft.KooX, Landschaft.KooY, Objektverwalter.Spielfeld), Rot)
        If Not Ausr = "+N+S" Then
            Ausr.ToString() 'Stimmt die Rotation noch?
        End If
        Dim Mat As Matrix = Matrix.RotationY(Rot)
        Mat.M41 = p_MatCube.M41 + 0.5
        Mat.M42 = p_MatCube.M42
        Mat.M43 = p_MatCube.M43 + 0.5
        Msh.Malen(Mat)
    End Sub

    Public Overrides Sub Ini3D()
        Msh = New Objekt3D()
        Msh.MeshBildLaden(DataSettings.Resourcenpfad + "Terrain\Meshes\PipelineS_Kaputt.x")
    End Sub

    Public Overrides Sub Tick()

    End Sub
End Class
Public Class LandschaftstexturKAPUTTEPIPESCHWEISS
    Inherits ObjektLandschaftsTextur



    Public Sub New()
        ID = "KAPUTTEPIPESCHWEISS"
        Landschaftsname = "Wueste"
        Deckung = 1
        Tarnung = False
        KP = -1
        TexturenLaden(New String() {"KAPUTTEPIPESCHWEISS+N+S", "KAPUTTEPIPESCHWEISS+O+W"})
        Normal = -1
        Ausrichtungslandschaften = New String() {"PIPELINE", "PLINE", "PIPE", "PIPESTATION", "FABRIK"}
    End Sub

    Public Overrides Function DrawSpecialStyle(ByVal BildID As Integer, ByVal Fog As Nebelarten, ByVal Alpha As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal TerrainUntergrundID As Integer, ByVal TerrainUntergrundBildID As Integer, ByVal TerrainUntergrundID2 As Integer, ByVal TerrainUntergrundBildID2 As Integer, Optional ByVal FixedLocation As Boolean = False, Optional ByVal Top As Boolean = False) As Boolean
        Return DrawTerrainUndUntergrund(Alpha, Fog, BildID, X, Y, 0, 0, TerrainUntergrundID, TerrainUntergrundBildID, TerrainUntergrundID2, TerrainUntergrundBildID2, FixedLocation, Top)
    End Function

    Public Overrides Function GetTerrainUntergrund() As String()
        Return New String() {"WUESTE", "SCHNEE", "EBENE"}
    End Function

    Public Overrides Sub Malen3D(ByVal p_MatCube As Microsoft.DirectX.Matrix, ByVal Landschaft As ObjektLandschaft)

    End Sub

    Public Overrides Sub Ini3D()

    End Sub

    Public Overrides Sub Tick()

    End Sub
End Class
Public Class LandschaftstexturPLineKaputt
    Inherits ObjektLandschaftsTextur



    Public Sub New()
        ID = "PLINEKAPUTT"
        Landschaftsname = "Schnee"
        Deckung = 1
        Tarnung = False
        KP = -1
        TexturenLaden(New String() {"PLineKaputt+N+S", "PLineKaputt+O+W"})
        Normal = -1
        Ausrichtungslandschaften = New String() {"PIPELINE", "PLINE", "PIPE", "PIPESTATION", "FABRIK"}
    End Sub

    Public Overrides Function DrawSpecialStyle(ByVal BildID As Integer, ByVal Fog As Nebelarten, ByVal Alpha As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal TerrainUntergrundID As Integer, ByVal TerrainUntergrundBildID As Integer, ByVal TerrainUntergrundID2 As Integer, ByVal TerrainUntergrundBildID2 As Integer, Optional ByVal FixedLocation As Boolean = False, Optional ByVal Top As Boolean = False) As Boolean
        Return DrawTerrainUndUntergrund(Alpha, Fog, BildID, X, Y, 0, 0, TerrainUntergrundID, TerrainUntergrundBildID, TerrainUntergrundID2, TerrainUntergrundBildID2, FixedLocation, Top)
    End Function

    Public Overrides Function GetTerrainUntergrund() As String()
        Return New String() {"SCHNEE", "EBENE", "WUESTE"}
    End Function

    Public Overrides Sub Malen3D(ByVal p_MatCube As Microsoft.DirectX.Matrix, ByVal Landschaft As ObjektLandschaft)

    End Sub

    Public Overrides Sub Ini3D()

    End Sub

    Public Overrides Sub Tick()

    End Sub
End Class
